﻿using System;

class SortInDescendingOrder

            // Sort 3 real values in descending order using nested if statements.

{
    static void Main()
    {
        Console.WriteLine("Enter three numbers:");
        double a = double.Parse(Console.ReadLine());
        double b = double.Parse(Console.ReadLine());
        double c = double.Parse(Console.ReadLine());
        if (a == b && b == c && a == c)
        {
            Console.WriteLine("The three numbers are equal!");
        }
        else
        {
            if (a > b)
            {
                double temp = a;
                a = b;
                b = temp;
            }
            if (b > c)
            {
                double temp = b;
                b = c;
                c = temp;
            }
            if (a > b)
            {
                double temp = b;
                b = a;
                a = temp;
            }
            Console.WriteLine("When sorted in descending order, the numbers look like this:\n {0}\n {1}\n {2}", a, b, c);
        }
    }
}

